local TweenService = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local tweenInfo2 = TweenInfo.new( 0.7, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0, false, 0 ) local guy Tool0 = Instance.new("Tool") Part1 = Instance.new("Part") Decal2 = Instance.new("Decal") Decal3 = Instance.new("Decal") Decal4 = Instance.new("Decal") Decal5 = Instance.new("Decal") Decal6 = Instance.new("Decal") Decal7 = Instance.new("Decal") Sound8 = Instance.new("Sound") Sound9 = Instance.new("Sound") Tool0.Name = "Pokéball" Tool0.Parent = owner.Backpack Tool0.Grip = CFrame.new(0, 0, 0.400000006, 1, 0, 0, 0, 1, 0, 0, 0, 1) Tool0.GripPos = Vector3.new(0, 0, 0.4000000059604645) Part1.Name = "Handle" Part1.Parent = Tool0 Part1.CFrame = CFrame.new(-40.4913635, 0.5, 28.5804749, 0, 0, 1, 1, 0, 0, 0, 1, 0) Part1.Orientation = Vector3.new(0, 90, 90) Part1.Position = Vector3.new(-40.491363525390625, 0.5, 28.580474853515625) Part1.Rotation = Vector3.new(90, 90, 0) Part1.Color = Color3.new(0.94902, 0.952941, 0.952941) Part1.Transparency = 1 Part1.Size = Vector3.new(1, 1, 1) Part1.BottomSurface = Enum.SurfaceType.Smooth Part1.BrickColor = BrickColor.new("White") Part1.TopSurface = Enum.SurfaceType.Smooth Part1.brickColor = BrickColor.new("White") Part1.Shape = Enum.PartType.Ball Decal2.Parent = Part1 Decal2.Texture = "http://www.roblox.com/asset/?id=5352896021" Decal2.Face = Enum.NormalId.Bottom Decal3.Parent = Part1 Decal3.Texture = "http://www.roblox.com/asset/?id=25770081" Decal4.Parent = Part1 Decal4.Texture = "http://www.roblox.com/asset/?id=25770106" Decal4.Face = Enum.NormalId.Left Decal5.Parent = Part1 Decal5.Texture = "http://www.roblox.com/asset/?id=25770106" Decal5.Face = Enum.NormalId.Back Decal6.Parent = Part1 Decal6.Texture = "http://www.roblox.com/asset/?id=25770106" Decal6.Face = Enum.NormalId.Right Decal7.Parent = Part1 Decal7.Texture = "http://www.roblox.com/asset/?id=25770136" Decal7.Face = Enum.NormalId.Top Sound8.Name = "CaptureSound" Sound8.Parent = Part1 Sound8.Pitch = 7 Sound8.PlaybackSpeed = 7 Sound8.SoundId = "http://www.roblox.com/asset/?id=69" Sound8.Volume = 1 Sound9.Name = "Release" Sound9.Parent = Part1 Sound9.Pitch = 2 Sound9.PlayOnRemove = false Sound9.PlaybackSpeed = 2 Sound9.SoundId = "http://www.roblox.com/asset/?id=69" Sound9.Volume = 1 event = Instance.new("RemoteEvent", owner.PlayerGui) event.Name = "PleaseDoIt" NLS([[ local mouse = game.Players.LocalPlayer:GetMouse() tool = script.Parent tool.Activated:Connect(function() local MousePos = mouse.Hit.p owner.PlayerGui.PleaseDoIt:FireServer(MousePos, mouse.Target) end) ]], Tool0) local thrown = false function shrinkModel(model) if model:IsA("Model") or model:IsA("Tool") then guy = model local highlight = Instance.new("Highlight", model) highlight.Adornee = model highlight.FillTransparency = 1 highlight.FillColor = Color3.new(1,1,1) highlight.OutlineTransparency = 1 highlight.DepthMode = Enum.HighlightDepthMode.Occluded local tween = TweenService:Create(highlight, tweenInfo, {FillTransparency = 0}) tween:Play() local tween = TweenService:Create(highlight, tweenInfo, {OutlineTransparency = 1}) tween:Play() wait(1) for _,part in pairs(model:GetDescendants()) do if part:IsA("BasePart") then part:BreakJoints() part.Anchored = true local tween = TweenService:Create(part, tweenInfo2, {Position = ball.Position}) tween:Play() local tween = TweenService:Create(part, tweenInfo2, {Size = Vector3.new(0,0,0)}) tween:Play() tween.Completed:Connect(function() part:Destroy() end) elseif part:IsA("SpecialMesh") then local tween = TweenService:Create(part, tweenInfo2, {Scale = Vector3.new(0,0,0)}) tween:Play() tween.Completed:Connect(function() part:Destroy() end) end end wait(0.7) local magnitude = (Part1.Position - ball.Position).Magnitude local tweenInfo = TweenInfo.new( magnitude / 50, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local tween = TweenService:Create(ball, tweenInfo, {Position = Part1.Position}) tween:Play() tween.Completed:Wait() for i,v in ipairs(Part1:GetChildren()) do if v:IsA("Decal") then v.Transparency = 0 end end ball:Destroy() thrown = false elseif model:IsA("BasePart") then guy = model local highlight = Instance.new("Highlight", model) highlight.Adornee = model highlight.FillTransparency = 1 highlight.FillColor = Color3.new(1,1,1) highlight.OutlineTransparency = 1 highlight.DepthMode = Enum.HighlightDepthMode.Occluded local tween = TweenService:Create(highlight, tweenInfo, {FillTransparency = 0}) tween:Play() local tween = TweenService:Create(highlight, tweenInfo, {OutlineTransparency = 1}) tween:Play() wait(1) model.Anchored = true local tween = TweenService:Create(model, tweenInfo2, {Position = ball.Position}) tween:Play() local tween = TweenService:Create(model, tweenInfo2, {Size = Vector3.new(0,0,0)}) tween:Play() tween.Completed:Connect(function() model:Destroy() end) wait(0.7) local magnitude = (Part1.Position - ball.Position).Magnitude local tweenInfo = TweenInfo.new( magnitude / 50, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local tween = TweenService:Create(ball, tweenInfo, {Position = Part1.Position}) tween:Play() tween.Completed:Wait() for i,v in ipairs(Part1:GetChildren()) do if v:IsA("Decal") then v.Transparency = 0 end end ball:Destroy() thrown = false elseif model:IsA("Script") then local model2 = model:FindFirstChildWhichIsA("Model") if model2 then guy = model2 local highlight = Instance.new("Highlight", model2) highlight.Adornee = model2 highlight.FillTransparency = 1 highlight.FillColor = Color3.new(1,1,1) highlight.OutlineTransparency = 1 highlight.DepthMode = Enum.HighlightDepthMode.Occluded local tween = TweenService:Create(highlight, tweenInfo, {FillTransparency = 0}) tween:Play() local tween = TweenService:Create(highlight, tweenInfo, {OutlineTransparency = 1}) tween:Play() wait(1) model.Anchored = true local tween = TweenService:Create(model, tweenInfo2, {Position = ball.Position}) tween:Play() local tween = TweenService:Create(model, tweenInfo2, {Size = Vector3.new(0,0,0)}) tween:Play() tween.Completed:Connect(function() model2:Destroy() end) wait(0.7) local magnitude = (Part1.Position - ball.Position).Magnitude local tweenInfo = TweenInfo.new( magnitude / 50, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local tween = TweenService:Create(ball, tweenInfo, {Position = Part1.Position}) tween:Play() tween.Completed:Wait() for i,v in ipairs(Part1:GetChildren()) do if v:IsA("Decal") then v.Transparency = 0 end end ball:Destroy() thrown = false else print("?????") local highlight = Instance.new("Highlight", model) highlight.Adornee = model highlight.FillTransparency = 1 highlight.FillColor = Color3.new(1,1,1) highlight.OutlineTransparency = 1 highlight.DepthMode = Enum.HighlightDepthMode.Occluded local tween = TweenService:Create(highlight, tweenInfo, {FillTransparency = 0}) tween:Play() local tween = TweenService:Create(highlight, tweenInfo, {OutlineTransparency = 1}) tween:Play() wait(1) model.Anchored = true local tween = TweenService:Create(model, tweenInfo2, {Position = ball.Position}) tween:Play() local tween = TweenService:Create(model, tweenInfo2, {Size = Vector3.new(0,0,0)}) tween:Play() tween.Completed:Connect(function() model:Destroy() end) wait(0.7) local magnitude = (Part1.Position - ball.Position).Magnitude local tweenInfo = TweenInfo.new( magnitude / 50, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local tween = TweenService:Create(ball, tweenInfo, {Position = Part1.Position}) tween:Play() tween.Completed:Wait() for i,v in ipairs(Part1:GetChildren()) do if v:IsA("Decal") then v.Transparency = 0 end end ball:Destroy() thrown = false end end end event.OnServerEvent:Connect(function(player, pos, target) if not thrown and target.Name ~= "Base" then thrown = true ball = Part1:Clone() ball.Parent = workspace ball.CFrame = Part1.CFrame ball.Anchored = true for i,v in ipairs(Part1:GetChildren()) do if v:IsA("Decal") then v.Transparency = 1 end end game:GetService("Debris"):AddItem(ball, 10) if target then if target.Name ~= "Base" then target.Anchored = true end end local magnitude = (ball.Position - pos).Magnitude local tweenInfo = TweenInfo.new( magnitude / 50, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local tween = TweenService:Create(ball, tweenInfo, {Position = pos}) tween:Play() tween.Completed:Wait() if target then if target.Name ~= "Base" then if target.Parent ~= workspace then local workspacechildren = workspace:GetChildren() for i,c in ipairs(workspacechildren) do if c:IsAncestorOf(target) then if c then if c.Name ~= "Base" then shrinkModel(c) end end end end else shrinkModel(target) --> sizes to 1/2 end end end end end)